/*
 * Copyright 2020-2020 yanchangyou
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

// This is a generated file. Not intended for manual editing.

package lang.psi;

import com.intellij.psi.tree.IElementType;
import com.intellij.psi.PsiElement;
import com.intellij.lang.ASTNode;
import my.lang.psi.MyLanguageElementType;
import my.lang.psi.MyLanguageTokenType;
import my.lang.psi.impl.*;

public interface MyLanguageTypes {

  IElementType MY_ALL_EXPRESS = new MyLanguageElementType("MY_ALL_EXPRESS");
  IElementType MY_ALL_IDENTIFIER = new MyLanguageElementType("MY_ALL_IDENTIFIER");
  IElementType MY_ALL_VALUE = new MyLanguageElementType("MY_ALL_VALUE");
  IElementType MY_ASSIGN_EXPRESS = new MyLanguageElementType("MY_ASSIGN_EXPRESS");
  IElementType MY_ASSIGN_STATEMENT = new MyLanguageElementType("MY_ASSIGN_STATEMENT");
  IElementType MY_BOOLEAN = new MyLanguageElementType("MY_BOOLEAN");
  IElementType MY_CODES = new MyLanguageElementType("MY_CODES");
  IElementType MY_FLOW_DEFINE_STATEMENT = new MyLanguageElementType("MY_FLOW_DEFINE_STATEMENT");
  IElementType MY_JSON_ALL_EXPRESS = new MyLanguageElementType("MY_JSON_ALL_EXPRESS");
  IElementType MY_JSON_ARRAY_EXPRESS = new MyLanguageElementType("MY_JSON_ARRAY_EXPRESS");
  IElementType MY_JSON_DEFINE_STATEMENT = new MyLanguageElementType("MY_JSON_DEFINE_STATEMENT");
  IElementType MY_JSON_OBJECT_EXPRESS = new MyLanguageElementType("MY_JSON_OBJECT_EXPRESS");
  IElementType MY_KEY_VALUE_EXPRESS = new MyLanguageElementType("MY_KEY_VALUE_EXPRESS");
  IElementType MY_REF_EXPRESS = new MyLanguageElementType("MY_REF_EXPRESS");
  IElementType MY_RETURN_STATEMENT = new MyLanguageElementType("MY_RETURN_STATEMENT");
  IElementType MY_SERVICE_CALL_EXPRESS = new MyLanguageElementType("MY_SERVICE_CALL_EXPRESS");
  IElementType MY_SERVICE_DEFINE_STATEMENT = new MyLanguageElementType("MY_SERVICE_DEFINE_STATEMENT");
  IElementType MY_SERVICE_INVOKE_STATEMENT = new MyLanguageElementType("MY_SERVICE_INVOKE_STATEMENT");
  IElementType MY_SERVICE_JSON_EXPRESS = new MyLanguageElementType("MY_SERVICE_JSON_EXPRESS");
  IElementType MY_SERVICE_PARAM = new MyLanguageElementType("MY_SERVICE_PARAM");
  IElementType MY_STATEMENT = new MyLanguageElementType("MY_STATEMENT");
  IElementType MY_SUB_ALL_EXPRESS = new MyLanguageElementType("MY_SUB_ALL_EXPRESS");
  IElementType MY_USI_EXPRESS = new MyLanguageElementType("MY_USI_EXPRESS");
  IElementType MY_VALUE = new MyLanguageElementType("MY_VALUE");

  IElementType MY_ASSIGN = new MyLanguageTokenType("=");
  IElementType MY_BRACE_LEFT = new MyLanguageTokenType("{");
  IElementType MY_BRACE_RIGHT = new MyLanguageTokenType("}");
  IElementType MY_BRACKET_LEFT = new MyLanguageTokenType("[");
  IElementType MY_BRACKET_RIGHT = new MyLanguageTokenType("]");
  IElementType MY_COLON = new MyLanguageTokenType(":");
  IElementType MY_COMMA = new MyLanguageTokenType(",");
  IElementType MY_DOT = new MyLanguageTokenType(".");
  IElementType MY_FALSE = new MyLanguageTokenType("false");
  IElementType MY_FLOW = new MyLanguageTokenType("flow");
  IElementType MY_IDENTIFIER = new MyLanguageTokenType("identifier");
  IElementType MY_JSON = new MyLanguageTokenType("json");
  IElementType MY_JSON_KEY_NAME = new MyLanguageTokenType("json_key_name");
  IElementType MY_LINE_COMMENT = new MyLanguageTokenType("line_comment");
  IElementType MY_NULL = new MyLanguageTokenType("null");
  IElementType MY_NUMBER = new MyLanguageTokenType("number");
  IElementType MY_PAREN_LEFT = new MyLanguageTokenType("(");
  IElementType MY_PAREN_RIGHT = new MyLanguageTokenType(")");
  IElementType MY_RETURN = new MyLanguageTokenType("return");
  IElementType MY_SEMICOLON = new MyLanguageTokenType(";");
  IElementType MY_SERVICE = new MyLanguageTokenType("service");
  IElementType MY_STRING = new MyLanguageTokenType("string");
  IElementType MY_THIS = new MyLanguageTokenType("this");
  IElementType MY_TRUE = new MyLanguageTokenType("true");
  IElementType MY_USI_KEY_NAME = new MyLanguageTokenType("usi_key_name");
  IElementType MY_USI_VALUE = new MyLanguageTokenType("usi_value");

  class Factory {
    public static PsiElement createElement(ASTNode node) {
      IElementType type = node.getElementType();
      if (type == MY_ALL_EXPRESS) {
        return new MyLanguageAllExpressImpl(node);
      }
      else if (type == MY_ALL_IDENTIFIER) {
        return new MyLanguageAllIdentifierImpl(node);
      }
      else if (type == MY_ALL_VALUE) {
        return new MyLanguageAllValueImpl(node);
      }
      else if (type == MY_ASSIGN_EXPRESS) {
        return new MyLanguageAssignExpressImpl(node);
      }
      else if (type == MY_ASSIGN_STATEMENT) {
        return new MyLanguageAssignStatementImpl(node);
      }
      else if (type == MY_BOOLEAN) {
        return new MyLanguageBooleanImpl(node);
      }
      else if (type == MY_CODES) {
        return new MyLanguageCodesImpl(node);
      }
      else if (type == MY_FLOW_DEFINE_STATEMENT) {
        return new MyLanguageFlowDefineStatementImpl(node);
      }
      else if (type == MY_JSON_ALL_EXPRESS) {
        return new MyLanguageJsonAllExpressImpl(node);
      }
      else if (type == MY_JSON_ARRAY_EXPRESS) {
        return new MyLanguageJsonArrayExpressImpl(node);
      }
      else if (type == MY_JSON_DEFINE_STATEMENT) {
        return new MyLanguageJsonDefineStatementImpl(node);
      }
      else if (type == MY_JSON_OBJECT_EXPRESS) {
        return new MyLanguageJsonObjectExpressImpl(node);
      }
      else if (type == MY_KEY_VALUE_EXPRESS) {
        return new MyLanguageKeyValueExpressImpl(node);
      }
      else if (type == MY_REF_EXPRESS) {
        return new MyLanguageRefExpressImpl(node);
      }
      else if (type == MY_RETURN_STATEMENT) {
        return new MyLanguageReturnStatementImpl(node);
      }
      else if (type == MY_SERVICE_CALL_EXPRESS) {
        return new MyLanguageServiceCallExpressImpl(node);
      }
      else if (type == MY_SERVICE_DEFINE_STATEMENT) {
        return new MyLanguageServiceDefineStatementImpl(node);
      }
      else if (type == MY_SERVICE_INVOKE_STATEMENT) {
        return new MyLanguageServiceInvokeStatementImpl(node);
      }
      else if (type == MY_SERVICE_JSON_EXPRESS) {
        return new MyLanguageServiceJsonExpressImpl(node);
      }
      else if (type == MY_SERVICE_PARAM) {
        return new MyLanguageServiceParamImpl(node);
      }
      else if (type == MY_STATEMENT) {
        return new MyLanguageStatementImpl(node);
      }
      else if (type == MY_SUB_ALL_EXPRESS) {
        return new MyLanguageSubAllExpressImpl(node);
      }
      else if (type == MY_USI_EXPRESS) {
        return new MyLanguageUsiExpressImpl(node);
      }
      else if (type == MY_VALUE) {
        return new MyLanguageValueImpl(node);
      }
      throw new AssertionError("Unknown element type: " + type);
    }
  }
}
